#ifndef DATAMODEL_H
#define DATAMODEL_H

#include <QAbstractTableModel>
#include <QVector>

struct Item
{
    int id;
    QString url;
    QString local;
    double  percent;

    Item() {}
    Item(int _id, const QString& _url, const QString& _local, double _p):
        id(_id), url(_url), local(_local),percent(_p)
    {
    }
};

class DataModel : public QAbstractTableModel
{
    Q_OBJECT

    QVector<Item> m_data;


public:
    explicit DataModel(QObject *parent = 0);
    int rowCount(const QModelIndex &parent) const;
    int columnCount(const QModelIndex &parent) const;
    QVariant data(const QModelIndex &index, int role) const;

signals:

public slots:

};

#endif // DATAMODEL_H
